home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
cprog.EXE
/
CMOS.TXT
< prev
next >
Wrap
Text File
|
1995-10-19
|
2KB
|
45 lines
┌──────────────────────────────────────────────────────────────────────────┐
│┌────────────────────────────────────────────────────────────────────────┐│
││ ││
││ CMOS bilgileri ││
││ ││
│└────────────────────────────────────────────────────────────────────────┘│
│ PS 27 · Ekim'95 Levent Yavaƒ │
└──────────────────────────────────────────────────────────────────────────┘
Aƒaºìda kodunu bulacaºìnìz programìmìz CMOS bilgilerini ekrana
getirir.
#include <dos.h>
#define UCHAR unsigned char
char *drive[]={ "Not Installed.","360Kb.","1.2Mb.","720Kb.","1.44Mb.",};
UCHAR GetByte(UCHAR adr )
{
outportb(0x70,adr);
return (inportb(0x71));
}
void main()
{
UCHAR a,b,c;
printf("\n──────────CMOS report by Levent Yavaƒ.──────────\n");
a=GetByte(0xd);
b=GetByte(0xe);
c=GetByte(0x10);
printf(" CMOS checksum %s\n",(b&64) ? "failure.":"OK.");
printf("Equipment configuration %s\n",(b&32) ? "failure":"OK.");
printf(" CMOS battery %s\n",(a&64) ? "dead.":"OK.");
printf(" Real time battery %s\n",(b&128) ? "failure.":"OK.");
printf(" CMOS time %s\n",(b&4) ? "failure.":"OK.");
printf(" RAM size %s\n",(b&16) ? "failure.":"OK.");
printf(" Hard disk %s\n",(b&8) ? "failure.":"OK.");
printf(" First drive %s\n",drive[c>>4]);
printf(" Second drive %s\n",drive[c&0xf]);
printf("─────────────────────────────────────────────────\n");
}